package com.dongpu.springboot.rabbitmq.rabbit;

import com.dongpu.springboot.rabbitmq.config.RabbitMQConfig;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author biyuyang
 *
 * 一个生产者对应一个消费者
 *
 */
@Component
@RabbitListener(queues = RabbitMQConfig.QUEUE_A)
public class MsgReceiverA {

	private final Logger logger =LoggerFactory.getLogger(this.getClass());

	@RabbitHandler
	public void process(String content){
		logger.info("接受处理消息队列A中的消息:" + content);
	}

}
